package com.ruoyi.sgsc.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 购物车详情对象 sg_cartitems
 * 
 * @author wy
 * @date 2024-09-29
 */
public class cartitems extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 购物车详情id */
    private Long cartitemId;

    /** 购物车id */
    @Excel(name = "购物车id")
    private Long cartId;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;
    /** 商品id */
    @Excel(name = "商品id")
    private Long productId;

    /** 数量 */
    @Excel(name = "数量")
    private Long quantity;

    /** 添加时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "添加时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date AddedAt;

    public void setCartitemId(Long cartitemId) 
    {
        this.cartitemId = cartitemId;
    }

    public Long getCartitemId() 
    {
        return cartitemId;
    }
    public void setCartId(Long cartId) 
    {
        this.cartId = cartId;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public Long getCartId() 
    {
        return cartId;
    }
    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }
    public void setQuantity(Long quantity) 
    {
        this.quantity = quantity;
    }

    public Long getQuantity() 
    {
        return quantity;
    }
    public void setAddedAt(Date AddedAt) 
    {
        this.AddedAt = AddedAt;
    }

    public Date getAddedAt() 
    {
        return AddedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("cartitemId", getCartitemId())
                .append("userId", getUserId())
            .append("cartId", getCartId())
            .append("productId", getProductId())
            .append("quantity", getQuantity())
            .append("AddedAt", getAddedAt())
            .toString();
    }
}
